package au.com.somethingwritten.model;

public class CartItem {
	Book item;
	Integer quantity;
	
	public CartItem(Book item, int quantity){
		this.item = item;
		this.quantity = quantity;
	}
	
	public void setItem(Book item){
		this.item = item;
	}
	
	public void setQuantity(int quantity){
		this.quantity = quantity;
	}
	
	public Book getItem(){
		return this.item;
	}
	
	public Double getCost(){
		return item.getPrice() * quantity;
	}
	
	public Integer getQuantity(){
		return this.quantity;
	}
}
